<template>
  <div class="hello">
    <!-- 顶部搜索框 -->
    <Header></Header>
    <!-- 轮播图 -->
    <Carousel></Carousel>
    <!-- 分类列表 -->
    <CategoryList :Listimg="List"></CategoryList>
    <!-- 新品上线 -->
    <Newproducts></Newproducts>
    <!-- 填充页 -->
    <Fill></Fill>
    <Navlist></Navlist>
  </div>
</template>

<script>
import {getcategoryList} from '../../api/index'
import Carousel from './components/Carousel'
import CategoryList from './components/CategoryList'
import Newproducts from './components/Newproducts'
import Fill from './components/fill.vue'
import Header from './components/Header'
import Navlist from '@/common/Navlist'
export default {
  name: 'Home',
  data () {
    return {
      List: []
    }
  },
  components: {
    Header,
    Carousel,
    CategoryList,
    Newproducts,
    Fill,
    Navlist
  },
  created () {
    getcategoryList().then(({data}) => {
      console.log(data)
      this.List = data.categoryList
    })
  }
}
</script>
<style lang="less" scoped>
</style>
